package org.example.kidscode.service.impl;

import org.example.kidscode.entity.PaymentPackage;
import org.example.kidscode.repository.PaymentPackageRepository;
import org.example.kidscode.service.PaymentPackageService;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Optional;

@Service
public class PaymentPackageServiceImpl implements PaymentPackageService {

    private final PaymentPackageRepository repository;

    public PaymentPackageServiceImpl(PaymentPackageRepository repository) {
        this.repository = repository;
    }

    @Override
    public List<PaymentPackage> findAll() {
        return repository.findAll();
    }

    @Override
    public Optional<PaymentPackage> findById(String id) {
        return repository.findById(id);
    }

    @Override
    public PaymentPackage save(PaymentPackage pkg) {
        return repository.save(pkg);
    }

    @Override
    public void deleteById(String id) {
        repository.deleteById(id);
    }
}

